<?php
class Projects extends Public_Controller
{
	function __construct()
	{
		parent::__construct();
	}
	
	function inc_home(){
		$data['projects'] = new Project();
		$data['projects']->where("status = 'approve'")->limit(4)->order_by("id","desc")->get();
		$this->load->view('inc_home',$data);
	}
	
	function index(){
        $data['projects'] = new Project();
        $data['projects']->where("status = 'approve'")->order_by("id","desc")->get_page(10);
        $this->template->build('index',$data);
    }
    
    function view($id){
        $data['project'] = new Project($id);
        $this->template->build('view',$data);
    }
}
?>